﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace LitTools
{
    /// <summary>
    /// LitSave拓展类
    /// </summary>
    public static class SaveManagerExt
    {
        /// <summary>
        /// 数据保存
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="data"></param>
        /// <param name="immediately">是否立即保存</param>
        public static void SaveData<T>(this T data, bool immediately=false) where T : SaveData<T>, new()
        {
            SaveManager.Instance.SaveData(data, immediately);
        }
    }
}
